import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
//数据  
 state:{
   goods: uni.getStorageSync("goods") ||  [],
 },

//柜台人员修改数据
mutations:{
    setGoods(state,goods){
        state.goods = goods
        uni.setStorageSync("goods", goods);
    },
},

getters: {
  // ...
  doneTodos: state => {
    return state.todos.filter(todo => todo.done)
  }
}

});
// 对外暴露
export default store;